#pragma once

#include <grpc++/grpc++.h>
#include "../../proto/rpc.grpc.pb.h"
#include "../action.hpp"
#include "rsp_delete.hpp"


using grpc::ClientAsyncResponseReader;
using etcdserverpb::DeleteRangeResponse;

namespace etcdv3 {
class AsyncDeleteAction : public Action {
public:
    AsyncDeleteAction(const ActionParameters& param);
    AsyncDeleteRangeResponse ParseResponse();
private:
    DeleteRangeResponse reply;
    std::unique_ptr<ClientAsyncResponseReader<DeleteRangeResponse>> reader;
};

}
